package hc.mvcappdemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeRestController {
	@Autowired
	DemoService demoService;

	@RequestMapping(value = "/rest")
	public Object rest() {
		String s = "hello world!";
		System.out.println(s);
		return s;
	}

	@RequestMapping(value = "/service")
	public Object service() {

		return demoService.toString();
	}
}
